package pseudoAssemblerCompiler.twopassassembler.model.symbolnametable;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * User: Роман
 * Date: 27.03.12
 * Time: 17:18
 */
public class SymbolicNamesLabelProvider implements ITableLabelProvider {

    private static final Logger LOGGER =
            LoggerFactory.getLogger(SymbolicNamesLabelProvider.class);

    @Override
    public Image getColumnImage(Object element, int columnIndex) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public String getColumnText(Object element, int columnIndex) {
        String[] symbolicNameElement = (String[]) element;
        String returnStr = null;

        switch (columnIndex) {
            case 0:
                returnStr = symbolicNameElement[0];
                break;
            case 1:
                returnStr = symbolicNameElement[1];
                break;
        }

        return returnStr;
    }

    @Override
    public void addListener(ILabelProviderListener listener) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void dispose() {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public boolean isLabelProperty(Object element, String property) {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void removeListener(ILabelProviderListener listener) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
